Merge lp:~sjr/kicad/buildsys into lp:kicad/product

Proposed by Simon Richter
Status: Merged
Merged at revision: 5642
Proposed branch: lp:~sjr/kicad/buildsys
Merge into: lp:kicad/product
Diff against target: 26 lines (+5/-4)
1 file modified
CMakeLists.txt (+5/-4)
To merge this branch: bzr merge lp:~sjr/kicad/buildsys
Reviewer Review Type Date Requested Status
Wayne Stambaugh Approve
Review via email: mp+258087@code.launchpad.net

Description of the change

Buildsystem fix, allowing gcc to be recognized during the first build (i.e. when no cache file exists). Without this patch, the entire gcc specific section in CMakeLists is skipped.

To post a comment you must log in.
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Please clarify which "entire gcc specific section in CMakeLists" you talking about. I just did some quick testing and the

if( CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
endif()

section in the main CMakeLists.txt gets executed without this change.

review: Needs Information
Revision history for this message
Simon Richter (sjr) wrote :

Sorry, misremembered the problem (I've made that change ages ago).

It's not the entire section that is being skipped, but just the parts dealing with GXX_HAS_VISIBILITY_FLAG and GXX_HAS_VISIBILITY_INLINES_FLAG, so on first run it doesn't set these flags even if the compiler supports them.

That became noticeable when I added the LTO support in the "lto" branch, because I placed that inside the gcc section as well.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

Thanks for the update. That makes more sense.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'CMakeLists.txt'
2--- CMakeLists.txt 2015-04-08 17:27:04 +0000
3+++ CMakeLists.txt 2015-05-01 21:51:09 +0000
4@@ -115,6 +115,11 @@
5 "Location of KiCad data files." )
6 endif()
7
8+# Generate build system specific header file.
9+include( PerformFeatureChecks )
10+perform_feature_checks()
11+
12+
13 #================================================
14 # Set flags for GCC, or treat llvm as GCC
15 #================================================
16@@ -563,10 +568,6 @@
17 # Include MinGW resource compiler.
18 include( MinGWResourceCompiler )
19
20-# Generate build system specific header file.
21-include( PerformFeatureChecks )
22-perform_feature_checks()
23-
24 # Find GDI+ on windows if wxGraphicsContext is available.
25 if( MINGW AND USE_WX_GRAPHICS_CONTEXT )
26 find_package( GdiPlus )