Skip to content

Commit

Permalink
cmake-fix (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelbon authored Oct 10, 2024
1 parent cfe29a5 commit a643422
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@ project(anyany LANGUAGES CXX)

option(AA_ENABLE_TESTING "enables testing" OFF)

file(GLOB ${PROJECT_NAME}_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/anyany/*.hpp")
file(GLOB ${PROJECT_NAME}_NOEXPORT_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/include/anyany/noexport/*.hpp")

### anyanylib ###

add_library(anyanylib INTERFACE "${${PROJECT_NAME}_HEADERS}" "${${PROJECT_NAME}_NOEXPORT_HEADERS}")
add_library(anyanylib INTERFACE)

target_include_directories(anyanylib INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")

Expand All @@ -18,11 +15,6 @@ set_target_properties(${PROJECT_NAME}lib PROPERTIES
CMAKE_CXX_STANDARD_REQUIRED ON
CXX_STANDARD 17)

### visual ###

source_group(Details FILES ${${PROJECT_NAME}_NOEXPORT_HEADERS})
source_group(Include FILES ${${PROJECT_NAME}_HEADERS})

### tests ###

if(AA_ENABLE_TESTING)
Expand All @@ -35,4 +27,4 @@ if(MSVC)
# and of course disables two warnings about "oh, im stupid msvc, support of this attribute in C++17 is an extension..."
# THEN FCN IGNORE IT, IT IS FOR WHAT ATTRIBUTES EXIST
target_compile_options(${PROJECT_NAME}lib INTERFACE "/Zc:__cplusplus" "/Zc:preprocessor" "/permissive-" "/wd5051" "/wd4848")
endif()
endif()

0 comments on commit a643422

Please sign in to comment.