Skip to content
Extraits de code Groupes Projets
Vérifiée Valider 0ab009e1 rédigé par Kubat's avatar Kubat
Parcourir les fichiers

BUILD: Use target_compile_features to pass C++ needed features

parent 27160baa
Aucune branche associée trouvée
Aucune étiquette associée trouvée
1 requête de fusion!7Add the ASS sub document and the ASS tree
......@@ -10,10 +10,6 @@ set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
# C++20, at least we try
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Pthread ftw
set(THREADS_PREFER_PTHREAD_FLAG ON)
......@@ -76,6 +72,23 @@ target_precompile_headers(Vivy PRIVATE
<QIcon>
)
# Set Vivy's needed C++ features
target_compile_features(Vivy PRIVATE
cxx_std_20
cxx_auto_type
cxx_deleted_functions
cxx_explicit_conversions
cxx_final
cxx_inline_namespaces
cxx_lambdas
cxx_noexcept
cxx_nonstatic_member_init
cxx_nullptr
cxx_override
cxx_range_for
cxx_strong_enums
)
# More options and warnings
target_compile_options(Vivy PRIVATE
-Wall -Wextra -Wshadow -pedantic
......@@ -91,7 +104,9 @@ if (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
-Wno-unused-private-field # Skip the unused private fields for now
-fopenmp # We do OpenMP here
)
target_link_libraries(Vivy PRIVATE -fopenmp)
target_link_libraries(Vivy PRIVATE
-fopenmp
)
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
target_compile_options(Vivy PRIVATE -fopenmp)
target_link_libraries(Vivy PRIVATE -fopenmp)
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter