From 679b550d94b6d49582773cec6954d54c49d9aada Mon Sep 17 00:00:00 2001 From: Laptop Windows Date: Wed, 21 Feb 2024 20:24:15 -0500 Subject: [PATCH] windows --- .idea/.gitignore | 8 ++++++++ .idea/.name | 1 + .idea/Femboy_GP.iml | 2 ++ .idea/deployment.xml | 14 ++++++++++++++ .idea/misc.xml | 4 ++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 8 ++++++++ CMakeLists.txt | 28 ++++++++++++++++++++++++---- libs/BLT | 2 +- 9 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 .idea/.gitignore create mode 100644 .idea/.name create mode 100644 .idea/Femboy_GP.iml create mode 100644 .idea/deployment.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/.gitignore b/.idea/.gitignore new file mode 100644 index 0000000..13566b8 --- /dev/null +++ b/.idea/.gitignore @@ -0,0 +1,8 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..a4a4389 --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +lilfbtf5 \ No newline at end of file diff --git a/.idea/Femboy_GP.iml b/.idea/Femboy_GP.iml new file mode 100644 index 0000000..f08604b --- /dev/null +++ b/.idea/Femboy_GP.iml @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/.idea/deployment.xml b/.idea/deployment.xml new file mode 100644 index 0000000..0e5114f --- /dev/null +++ b/.idea/deployment.xml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..79b3c94 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..ced7b06 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..b553b2f --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 6778221..1e0e9f0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,9 @@ option(ENABLE_ADDRSAN "Enable the address sanitizer" OFF) option(ENABLE_UBSAN "Enable the ub sanitizer" OFF) option(ENABLE_TSAN "Enable the thread data race sanitizer" OFF) +if(!MSVC) add_compile_options(-march=native) +endif() set(CMAKE_CXX_STANDARD 17) @@ -19,8 +21,17 @@ add_library(lilfbtf5 ${PROJECT_BUILD_FILES}) target_include_directories(lilfbtf5 PUBLIC include/) target_link_libraries(lilfbtf5 PUBLIC BLT) -target_compile_options(lilfbtf5 PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-comment) -target_link_options(lilfbtf5 PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-comment) +message("Is MSVC ${MSVC}") + +if(MSVC) + message("Using MSVC") + #target_compile_options(${BLT_TARGET} PRIVATE /W4) +else() + message("Using non MSVC options") + # perhaps we should warn on unused variables, but BLT will have lots of them. + target_compile_options(lilfbtf5 PRIVATE -Wall -Wextra -Wpedantic -Wno-comment) + target_link_options(lilfbtf5 PRIVATE -Wall -Wextra -Wpedantic -Wno-comment) +endif() if (${ENABLE_ADDRSAN} MATCHES ON) target_compile_options(lilfbtf5 PRIVATE -fsanitize=address) @@ -44,8 +55,17 @@ add_executable(lilfbtf5_test ${PROJECT_TESTS_BUILD_FILES}) target_include_directories(lilfbtf5_test PUBLIC tests/include/) target_link_libraries(lilfbtf5_test PUBLIC lilfbtf5) -target_compile_options(lilfbtf5_test PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-comment) -target_link_options(lilfbtf5_test PRIVATE -Wall -Wextra -Werror -Wpedantic -Wno-comment) + +if(MSVC) + message("Using MSVC") + #target_compile_options(${BLT_TARGET} PRIVATE /W4) +else() + message("Using non MSVC options") + # perhaps we should warn on unused variables, but BLT will have lots of them. + target_compile_options(lilfbtf5_test PRIVATE -Wall -Wextra -Wpedantic -Wno-comment) + target_link_options(lilfbtf5_test PRIVATE -Wall -Wextra -Wpedantic -Wno-comment) +endif() + if (${ENABLE_ADDRSAN} MATCHES ON) target_compile_options(lilfbtf5_test PRIVATE -fsanitize=address) diff --git a/libs/BLT b/libs/BLT index 392c327..43cf8c0 160000 --- a/libs/BLT +++ b/libs/BLT @@ -1 +1 @@ -Subproject commit 392c32751da3f23644990581fda9fe59ec603de2 +Subproject commit 43cf8c0ba1c151048679d0cfbeb6d82dab757a64