summaryrefslogtreecommitdiffstats
path: root/Help/guide/tutorial/Step11/MathFunctions
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-07-29 15:49:35 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-07-29 15:49:45 (GMT)
commitd275877dfcee52938e8564febe6f57f96c10f351 (patch)
tree41fe4fa6b197f14e444fcd409006d3bb7124c68e /Help/guide/tutorial/Step11/MathFunctions
parent23503ba5f0425cb4e434d67b72e2b6cd60350b61 (diff)
parentfa203ee32375d1e1f92a5be0155b02ca46ab8ead (diff)
downloadCMake-d275877dfcee52938e8564febe6f57f96c10f351.zip
CMake-d275877dfcee52938e8564febe6f57f96c10f351.tar.gz
CMake-d275877dfcee52938e8564febe6f57f96c10f351.tar.bz2
Merge topic 'better_gen_exp_example_tutotrial'
fa203ee323 Tutorial: Improve Step 10 generator expression example. Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !3571
Diffstat (limited to 'Help/guide/tutorial/Step11/MathFunctions')
-rw-r--r--Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt b/Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt
index ea42770..daaaa55 100644
--- a/Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt
+++ b/Help/guide/tutorial/Step11/MathFunctions/CMakeLists.txt
@@ -19,6 +19,7 @@ if(USE_MYMATH)
# first we add the executable that generates the table
add_executable(MakeTable MakeTable.cxx)
+ target_link_libraries(MakeTable tutorial_compiler_flags)
# add the command to generate the source code
add_custom_command(
@@ -42,14 +43,17 @@ if(USE_MYMATH)
POSITION_INDEPENDENT_CODE ${BUILD_SHARED_LIBS}
)
- target_compile_definitions(SqrtLibrary PRIVATE
- "$<$<BOOL:${HAVE_LOG}>:HAVE_LOG>"
- "$<$<BOOL:${HAVE_EXP}>:HAVE_EXP>"
- )
+ target_link_libraries(SqrtLibrary PUBLIC tutorial_compiler_flags)
+
+ target_compile_definitions(MathFunctions PRIVATE "USE_MYMATH")
+ if(HAVE_LOG AND HAVE_EXP)
+ target_compile_definitions(SqrtLibrary
+ PRIVATE "HAVE_LOG" "HAVE_EXP")
+ endif()
target_link_libraries(MathFunctions PRIVATE SqrtLibrary)
endif()
-target_compile_definitions(MathFunctions PRIVATE "$<$<BOOL:${USE_MYMATH}>:USE_MYMATH>")
+target_link_libraries(MathFunctions PUBLIC tutorial_compiler_flags)
# define the symbol stating we are using the declspec(dllexport) when
#building on windows