Skip to content

Commit

Permalink
Some Update
Browse files Browse the repository at this point in the history
- Added new C++23 support.
- Added new inline file extension support [inl and ipp].
  • Loading branch information
TheCompez committed Jan 16, 2024
1 parent e84be04 commit 40a0a24
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
10 changes: 8 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -------------------- PROJECT TEMPLATE INFO ---------------------------------------------
# Title : Project Template
# Version : 1.1.225
# Version : 1.1.325
# Author : Kambiz Asadzadeh
# Url : https://github.com/genyleap/Project-Template
# Organization : The Genyleap
Expand Down Expand Up @@ -112,6 +112,8 @@ endif()

set(SUFFIX_EXTRA *.in)
set(SUFFIX_HPPHEADER *.hpp)
set(SUFFIX_IPPHEADER *.ipp)
set(SUFFIX_INLHEADER *.inl)
set(SUFFIX_SOURCE *.cpp)
set(SUFFIX_CONFIG *.json)

Expand All @@ -123,7 +125,11 @@ elseif(PROJECT_MAIN_TYPE STREQUAL "qtquick")
endif()

file(GLOB PRECOMPILED precompiled/pch.hpp)
file(GLOB HEADERS source/${SUFFIX_HPPHEADER})
file(GLOB HEADERS
source/${SUFFIX_HPPHEADER}
source/${SUFFIX_IPPHEADER}
source/${SUFFIX_INLHEADER}
)
file(GLOB SOURCES source/${SUFFIX_SOURCE})

file(GLOB EXAMPLES
Expand Down
8 changes: 8 additions & 0 deletions cmake/compiler-options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,14 @@ if (OPTIMIZATION_LEVEL)
add_definitions(-DOPTIMIZATION_LEVEL)
endif()

# -lstdc++: Links against the GNU Standard C++ Library.
# -lc++: Links against the libc++ library (used in Clang/LLVM compiler).
# -lc++abi: Links against the libc++abi library, which provides low-level support for the C++ runtime (used in Clang/LLVM compiler).
# Note: Both GCC and MSVC, you generally don't need to explicitly include flags like -lc++abi or their equivalents.

# C++ STL Library Features.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lstdc++")
find_package(TBB REQUIRED COMPONENTS tbb)
list(APPEND LIB_STL_MODULES_LINKER tbb)
endif()
Expand All @@ -46,10 +52,12 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lc++ -lc++abi")
#Todo...
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lc++ -lc++abi")
#Todo...
endif()

Expand Down
2 changes: 1 addition & 1 deletion config/project.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(PROJECT_REAL_NAME "PT" CACHE STRING "Project Real Name.")

set(PROJECT_VERSION_MAJOR 1)
set(PROJECT_VERSION_MINOR 1)
set(PROJECT_VERSION_PATCH 300)
set(PROJECT_VERSION_PATCH 325)

#Your project creator.
set(PROJECT_CREATOR "Kambiz Asadzadeh" CACHE STRING "Creator of your project.")
Expand Down

0 comments on commit 40a0a24

Please sign in to comment.