File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77 "description" : " Preset to use with the tutorial" ,
88 "binaryDir" : " ${sourceDir}/build" ,
99 "cacheVariables" : {
10+ "CMAKE_CXX_COMPILER" :" g++-13" ,
11+ "CMAKE_EXPORT_COMPILE_COMMANDS" :" ON" ,
12+
1013 "TUTORIAL_USE_STD_SQRT" : " OFF"
1114 }
1215 }
Original file line number Diff line number Diff line change @@ -28,10 +28,15 @@ endif()
2828
2929# TODO1: Include the CheckIncludeFiles module and use it to check for
3030# the emmintrin.h header.
31+ include (CheckIncludeFiles )
32+ CHECK_INCLUDE_FILES (emmintrin.h HAS_EMMINTRIN LANGUAGE CXX )
3133
3234# TODO2: If emmintrin.h is available, add a compile definition to MathFunctions
3335# named TUTORIAL_USE_SSE2. This will only be needed by the MathFunctions
3436# implementation file.
37+ if (HAS_EMMINTRIN)
38+ target_compile_definitions (MathFunctions PRIVATE TUTORIAL_USE_SSE2 )
39+ endif ()
3540
3641# TODO4: Include the CheckSourceCompiles module and use it to check if the
3742# following program compiles:
Original file line number Diff line number Diff line change 55
66// TODO3: If the TUTORIAL_USE_SSE2 definition is set, include
77// the <emmintrin.h> header
8+ #ifdef TUTORIAL_USE_SSE2
9+ #include " emmintrin.h"
10+ #endif
811
912namespace {
1013
You can’t perform that action at this time.
0 commit comments