Path: blob/master/Help/guide/tutorial/Step6/MathFunctions/CMakeLists.txt
5018 views
add_library(MathFunctions)12target_sources(MathFunctions3PRIVATE4MathFunctions.cxx56PUBLIC7FILE_SET HEADERS8FILES9MathFunctions.h10)1112target_link_libraries(MathFunctions13PRIVATE14MathLogger1516PUBLIC17OpAdd18OpMul19OpSub20)2122target_compile_features(MathFunctions PRIVATE cxx_std_20)2324if(TUTORIAL_USE_STD_SQRT)25target_compile_definitions(MathFunctions PRIVATE TUTORIAL_USE_STD_SQRT)26endif()2728# TODO1: Include the CheckIncludeFiles module and use it to check for29# the emmintrin.h header.3031# TODO2: If emmintrin.h is available, add a compile definition to MathFunctions32# named TUTORIAL_USE_SSE2. This will only be needed by the MathFunctions33# implementation file.3435# TODO4: Include the CheckSourceCompiles module and use it to check if the36# following program compiles:37#38# typedef double v2df __attribute__((vector_size(16)));39# int main() {40# __builtin_ia32_sqrtsd(v2df{});41# }4243# TODO5: If the GNU builtins are available, add a compile definition to44# MathFunctions named TUTORIAL_USE_GNU_BUILTIN. This will only be needed45# by the MathFunctions implementation file.4647add_subdirectory(MathLogger)48add_subdirectory(MathExtensions)495051