-
Notifications
You must be signed in to change notification settings - Fork 62
Einstein: port to FreeBSD #208
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -56,6 +56,10 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" ) | |
|
|
||
| # Linux: nothing to do here | ||
|
|
||
| elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD" OR ${CMAKE_SYSTEM_NAME} STREQUAL "NetBSD" ) | ||
|
|
||
| # FreeBSD and NetBSD: nothing to do here | ||
|
|
||
| elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" ) | ||
|
|
||
| set_property ( GLOBAL PROPERTY FIND_LIBRARY_USE_OPENBSD_VERSIONING 1 ) | ||
|
|
@@ -422,7 +426,7 @@ if ( ${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" ) | |
| ) | ||
| endif () | ||
|
|
||
| elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" ) | ||
| elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$" ) | ||
|
|
||
| # create the application | ||
| add_executable ( Einstein | ||
|
|
@@ -442,17 +446,22 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL | |
| # how to compile and link | ||
| target_compile_options ( Einstein PUBLIC | ||
| -Wall -Wno-multichar -Wno-misleading-indentation -Wno-unused-result | ||
| -Wno-missing-field-initializers -Wno-stringop-truncation # -Werror | ||
| -Wno-missing-field-initializers # -Werror | ||
| # Werror is disabled for testing purposes. Must reenable as soon as all Linux warnings are fixed. | ||
| ) | ||
| target_compile_options ( EinsteinTests PUBLIC | ||
| -Wall -Wno-multichar -Wno-misleading-indentation -Wno-unused-result | ||
| -Wno-missing-field-initializers -Wno-stringop-truncation -Werror | ||
| -Wno-missing-field-initializers -Werror | ||
| ) | ||
| target_compile_options ( EinsteinFLGUI PUBLIC | ||
| -Wall -Wno-multichar -Wno-misleading-indentation -Wno-unused-result | ||
| -Wno-missing-field-initializers -Wno-stringop-truncation -Werror | ||
| -Wno-missing-field-initializers -Werror | ||
| ) | ||
| if (CMAKE_C_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
| target_compile_options(Einstein PUBLIC -Wno-stringop-truncation) | ||
| target_compile_options(EinsteinTests PUBLIC -Wno-stringop-truncation) | ||
| target_compile_options(EinsteinFLGUI PUBLIC -Wno-stringop-truncation) | ||
| endif() | ||
|
Comment on lines
+460
to
+464
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Comment on lines
+460
to
+464
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| target_compile_definitions ( Einstein PRIVATE | ||
| TARGET_UI_FLTK=1 TARGET_OS_LINUX=1 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The widened There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| ) | ||
|
|
@@ -478,8 +487,8 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL | |
| fltk::fltk fltk::images fltk::png fltk::z | ||
| ) | ||
|
|
||
| if ( ${CMAKE_SYSTEM_NAME} STREQUAL "OpenBSD" ) | ||
| # Under OpenBSD, libffi is in ports (i.e. /usr/local) not base (i.e. /usr) | ||
| if ( ${CMAKE_SYSTEM_NAME} MATCHES ".*BSD$" ) | ||
| # Under BSD, libffi is in ports (i.e. /usr/local) not base (i.e. /usr) | ||
| find_library ( ffi_lib NAMES ffi ) | ||
| find_file ( ffi_incl NAMES ffi.h ) | ||
| if ( ffi_lib MATCHES ".*NOTFOUND" OR ffi_incl MATCHES ".*NOTFOUND" ) | ||
|
|
@@ -492,7 +501,7 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL | |
| target_link_libraries ( Einstein ${ffi_lib} ) | ||
| endif () | ||
|
|
||
| # Under OpenBSD, pulseaudio is in ports (i.e. /usr/local) not base (i.e. /usr) | ||
| # Under BSD, pulseaudio is in ports (i.e. /usr/local) not base (i.e. /usr) | ||
| find_library ( pulse_lib NAMES pulse ) | ||
| if ( pulse_lib MATCHES ".*NOTFOUND" ) | ||
| message ( FATAL_ERROR "libpulse not found! " ) | ||
|
|
@@ -502,7 +511,7 @@ elseif ( ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR ${CMAKE_SYSTEM_NAME} STREQUAL | |
| target_link_libraries ( Einstein ${pulse_lib} ) | ||
| endif () | ||
|
|
||
| # Under OpenBSD, X11 is in /usr/X11R6 | ||
| # Under BSD, find X11 | ||
| include ( FindX11 ) | ||
| if ( X11_FOUND ) | ||
| target_include_directories ( Einstein SYSTEM PUBLIC ${X11_INCLUDE_DIR} ) | ||
|
|
@@ -681,7 +690,7 @@ configure_file ( | |
| # | ||
|
|
||
| find_program(CLANG_FORMAT_EXECUTABLE | ||
| NAMES clang-format-14 clang-format-mp-14 clang-format | ||
| NAMES clang-format-14 clang-format-mp-14 clang-format19 clang-format | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This now prefers Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time! |
||
| HINTS /usr/local/opt/clang-format@14/bin/ /usr/lib/llvm-14/bin/ | ||
| DOC "clang-format executable") | ||
| if(CLANG_FORMAT_EXECUTABLE) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.