File tree Expand file tree Collapse file tree 3 files changed +27
-7
lines changed Expand file tree Collapse file tree 3 files changed +27
-7
lines changed Original file line number Diff line number Diff line change 6060 run : |
6161 cd build/test
6262 ./cpp_katas_test --output=color
63+
64+ build-windows :
65+ runs-on : windows-latest
66+
67+ steps :
68+ - name : Checkout
69+ uses : actions/checkout@v3
70+
71+ - name : Install needed software
72+ run : |
73+ choco install ninja
74+
75+ - name : Build
76+ run : |
77+ cd build
78+ cmake -G "Ninja" ..
79+ cmake --build .
80+
81+ - name : Run tests
82+ run : |
83+ cd build/test
84+ .\cpp_katas_test.exe --output=color
Original file line number Diff line number Diff line change @@ -20,11 +20,11 @@ if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) OR BUILD_TESTING)
2020 endif ()
2121
2222 # https://github.com/joakimkarlsson/igloo/issues/21
23- # To avoid errors during compilation of igloo
24- set (CMAKE_CXX_FLAGS "-Wno-error=deprecated-declarations" )
25-
2623 # igloo needs some CXX11 features like `std::auto_ptr` to be enabled
24+ # flag for the gcc compiler:
2725 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_LIBCPP_ENABLE_CXX17_REMOVED_FEATURES" )
26+ # ... and `cl` compiler needs this flag:
27+ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_HAS_AUTO_PTR_ETC=1" )
2828
2929 include_directories ("${PROJECT_SOURCE_DIR} /extern/igloo" )
3030 add_subdirectory (test )
Original file line number Diff line number Diff line change 11file (GLOB_RECURSE SOURCES *.cpp)
2- #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O0")
3- #set(CMAKE_CXX_FLAGS "-O0 ${CMAKE_CXX_FLAGS}")
4- #set(CMAKE_CXX_FLAGS "-Od ${CMAKE_CXX_FLAGS}")
2+
53set (CMAKE_C_COMPILER_FORCED TRUE )
64set (CMAKE_CXX_COMPILER_FORCED TRUE )
75
86add_library (cpp_katas_lib ${SOURCES} )
97
108target_sources (cpp_katas_lib PUBLIC ${SOURCES} )
119target_include_directories (cpp_katas_lib PUBLIC "${PROJECT_SOURCE_DIR} /include" )
12- target_link_libraries (cpp_katas_lib m )
10+ target_link_libraries (cpp_katas_lib)
1311
You can’t perform that action at this time.
0 commit comments