Skip to content

Fix includes #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,9 @@ add_definitions( -D_VARIADIC_MAX=10 )
add_definitions( -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING=1)

INCLUDE_DIRECTORIES( BEFORE
${CMAKE_HOME_DIRECTORY}/..
${CMAKE_HOME_DIRECTORY}/include/
${CMAKE_HOME_DIRECTORY}/contrib/googletest-1.10.0/gtest/include
${CMAKE_HOME_DIRECTORY}/contrib/googletest-1.10.0/gtest
include/
contrib/googletest-1.10.0/gtest/include
contrib/googletest-1.10.0/gtest
)

link_directories(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endmacro()

####################################################################################
include(CMakeFindDependencyMacro)
if ()
if (ON)
set(THREADS_PREFER_PTHREAD_FLAG )
find_dependency(Threads)
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ else()
endif()


# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()
Comment on lines +33 to +36
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the hardcoded condition to make it configurable.

The condition if("FALSE") is hardcoded to always skip the architecture check. This should likely be based on a variable or configuration option to make it configurable.

- if("FALSE")
+ if(NOT DEFINED NO_ARCHITECTURE_CHECK OR NO_ARCHITECTURE_CHECK)
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# if the installed project requested no architecture check, don't perform the check
if("FALSE")
return()
endif()
# if the installed project requested no architecture check, don't perform the check
if(NOT DEFINED NO_ARCHITECTURE_CHECK OR NO_ARCHITECTURE_CHECK)
return()
endif()


# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "8" STREQUAL "")
return()
Expand Down
6 changes: 3 additions & 3 deletions contrib/googletest-1.10.x/googletest/generated/gmock.pc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
libdir=C:/Program Files (x86)/cppcore/lib
includedir=C:/Program Files (x86)/cppcore/include
libdir=/usr/local/lib
includedir=/usr/local/include

Name: gmock
Description: GoogleMock (without main() function)
Version: 1.14.0
URL: https://github.com/google/googletest
Requires: gtest = 1.14.0
Libs: -L${libdir} -lgmock
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=0
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1
6 changes: 3 additions & 3 deletions contrib/googletest-1.10.x/googletest/generated/gmock_main.pc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
libdir=C:/Program Files (x86)/cppcore/lib
includedir=C:/Program Files (x86)/cppcore/include
libdir=/usr/local/lib
includedir=/usr/local/include

Name: gmock_main
Description: GoogleMock (with main() function)
Version: 1.14.0
URL: https://github.com/google/googletest
Requires: gmock = 1.14.0
Libs: -L${libdir} -lgmock_main
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=0
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1
6 changes: 3 additions & 3 deletions contrib/googletest-1.10.x/googletest/generated/gtest.pc
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
libdir=C:/Program Files (x86)/cppcore/lib
includedir=C:/Program Files (x86)/cppcore/include
libdir=/usr/local/lib
includedir=/usr/local/include

Name: gtest
Description: GoogleTest (without main() function)
Version: 1.14.0
URL: https://github.com/google/googletest
Libs: -L${libdir} -lgtest
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=0
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1
6 changes: 3 additions & 3 deletions contrib/googletest-1.10.x/googletest/generated/gtest_main.pc
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
libdir=C:/Program Files (x86)/cppcore/lib
includedir=C:/Program Files (x86)/cppcore/include
libdir=/usr/local/lib
includedir=/usr/local/include

Name: gtest_main
Description: GoogleTest (with main() function)
Version: 1.14.0
URL: https://github.com/google/googletest
Requires: gtest = 1.14.0
Libs: -L${libdir} -lgtest_main
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=0
Cflags: -I${includedir} -DGTEST_HAS_PTHREAD=1
Loading