fix(cmake): configuration generation fails when BUILD_TESTS is OFF (#3416)
This commit is contained in:
parent
d5854ae224
commit
8d2e322e1a
1 changed files with 9 additions and 3 deletions
|
|
@ -113,9 +113,15 @@ set_source_files_properties("${CMAKE_SOURCE_DIR}/third-party/ViGEmClient/src/ViG
|
||||||
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
string(TOUPPER "x${CMAKE_BUILD_TYPE}" BUILD_TYPE)
|
||||||
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
|
if("${BUILD_TYPE}" STREQUAL "XDEBUG")
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
|
if (NOT BUILD_TESTS)
|
||||||
DIRECTORY "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/tests"
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
|
||||||
PROPERTIES COMPILE_FLAGS -O2)
|
DIRECTORY "${CMAKE_SOURCE_DIR}"
|
||||||
|
PROPERTIES COMPILE_FLAGS -O2)
|
||||||
|
else()
|
||||||
|
set_source_files_properties("${CMAKE_SOURCE_DIR}/src/nvhttp.cpp"
|
||||||
|
DIRECTORY "${CMAKE_SOURCE_DIR}" "${CMAKE_SOURCE_DIR}/tests"
|
||||||
|
PROPERTIES COMPILE_FLAGS -O2)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
add_definitions(-DNDEBUG)
|
add_definitions(-DNDEBUG)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue