Skip to content

Commit

Permalink
Use compile options
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <[email protected]>
  • Loading branch information
uilianries committed May 23, 2024
1 parent daf34e7 commit c3a1675
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion .github/workflows/linux-gxx-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
push:
branches:
- 'main'
- 'feature/external-deps'
workflow_dispatch:
pull_request:

Expand Down
13 changes: 5 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@ if (NOT USE_SYSTEM_DEPENDENCIES)
HAS_STD_FORMAT)
endif()

if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /permissive- /bigobj")
else ()
set(CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wconversion -Wformat -Werror"
)
endif ()

set(LIBRARY_NAME faker-cxx)

set(FAKER_SOURCES
Expand Down Expand Up @@ -117,6 +109,11 @@ target_include_directories(
$<INSTALL_INTERFACE:include>)

target_compile_features(${LIBRARY_NAME} PUBLIC cxx_std_20)
if (MSVC)
target_compile_options(${LIBRARY_NAME} PRIVATE /permissive- /bigobj)
else ()
target_compile_options(${LIBRARY_NAME} PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wformat -Werror)
endif ()

install(TARGETS ${LIBRARY_NAME}
EXPORT ${LIBRARY_NAME}-targets
Expand Down

0 comments on commit c3a1675

Please sign in to comment.