mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
CMake: Don't build unit tests if private symbols are hidden
This only excludes building unit tests from default build ( 'all' Make target or "Build Solution" in VisualStudio). The projects and Make targets will still be generated and shown in supporting IDEs. Fixes https://github.com/curl/curl/issues/981 Reported-by: Randy Armstrong Closes https://github.com/curl/curl/pull/990
This commit is contained in:
parent
6140dfcf3e
commit
257bf3ac67
@ -40,7 +40,15 @@ foreach(_testfile ${UT_SRC})
|
|||||||
set_target_properties(${_testname}
|
set_target_properties(${_testname}
|
||||||
PROPERTIES COMPILE_DEFINITIONS "UNITTESTS")
|
PROPERTIES COMPILE_DEFINITIONS "UNITTESTS")
|
||||||
|
|
||||||
|
if(HIDES_CURL_PRIVATE_SYMBOLS)
|
||||||
|
set_target_properties(${_testname}
|
||||||
|
PROPERTIES
|
||||||
|
EXCLUDE_FROM_ALL TRUE
|
||||||
|
EXCLUDE_FROM_DEFAULT_BUILD TRUE
|
||||||
|
)
|
||||||
|
else()
|
||||||
add_test(NAME ${_testname}
|
add_test(NAME ${_testname}
|
||||||
COMMAND ${_testname} "http://www.google.com"
|
COMMAND ${_testname} "http://www.google.com"
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
Loading…
Reference in New Issue
Block a user