-
Notifications
You must be signed in to change notification settings - Fork 244
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
experimental NTL support for cmake #543
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2828dd9
experimental NTL support for cmake
dimpase 56106e4
Fix NTL library linking and make it optional
isuruf 51d6e37
Build shared libs by default with an option
isuruf f49c82c
Fix pthreads linking on unix
isuruf 43d4f35
Don't overwrite CPimport.h every time CMake is run
isuruf cb34b44
Merge pull request #1 from isuruf/cmake_NTL
dimpase 8828f6e
Add flags from makefile build
isuruf c72d5bf
Fix linking libraries
isuruf a923164
Fix linking order
isuruf 602c907
a short README about cmake builds
dimpase 11a4f5d
needed by cmake builds on x86* Gentoo systems
dimpase d0e49d2
Merge pull request #2 from isuruf/cmake_NTL
dimpase 22c8eec
fix a typo that broke the build
dimpase c8906d9
more details about parallel cmake builds/tests
dimpase 0a01ffb
cmake Travis CI tests
dimpase 027e645
yaml syntax fix
dimpase 84f9d1a
correct directory levels
dimpase File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Locate NTL | ||
# This module defines | ||
# NTL_LIBRARY | ||
# NTL_FOUND, if false, do not try to link to OpenAL | ||
# NTL_INCLUDE_DIR, where to find the headers | ||
# | ||
# Created by Tai Chi Minh Ralph Eastwood <tcmreastwood@gmail.com> | ||
|
||
FIND_PATH(NTL_INCLUDE_DIR NTL/RR.h | ||
HINTS | ||
$ENV{NTLDIR} | ||
) | ||
|
||
FIND_LIBRARY(NTL_LIBRARY | ||
NAMES ntl | ||
HINTS | ||
$ENV{NTLDIR} | ||
) | ||
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.
|
||
|
||
# handle the QUIETLY and REQUIRED arguments and set NTL_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(NTL DEFAULT_MSG NTL_LIBRARY NTL_INCLUDE_DIR) | ||
|
||
MARK_AS_ADVANCED(NTL_LIBRARY NTL_INCLUDE_DIR) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
Quick cmake configuring/building/testing instuctions for Unix (Linux/OSX/*BSD) | ||
|
||
Parameters: | ||
|
||
WITH_NTL (yes/no) - builds Flint with NTL support | ||
|
||
BUILD_TESTING (yes/no) - build tests | ||
|
||
CMAKE_BUILD_TYPE - type of the build | ||
|
||
Typically cmake buildig is done in a clean subdirectory: | ||
|
||
mkdir build | ||
cd build | ||
# creates a debug build of Flint without NTL support | ||
cmake -G"Unix Makefiles" .. | ||
|
||
At the end of cmake run, it says where the build is located; in some settings it might be in the | ||
main Flint directory, i.e. you would have to | ||
|
||
cd .. | ||
|
||
make -j4 # builds Flint in lib/ | ||
|
||
# creates a realease build of Flint with NTL support and tests | ||
cmake -G"Unix Makefiles" -DWITH_NTL=yes -DBUILD_TESTING=yes -DCMAKE_BUILD_TYPE=Release .. | ||
make -j4 # builds Flint in lib/ | ||
make test # runs Flint tests - this takes a while | ||
|
||
It is apparently more efficient to run tests directly using ctest, it will try to run slower | ||
tests first: | ||
|
||
ctest -j4 # on 4 cores | ||
|
||
before running make. More details about parallel builds may be found in | ||
https://blog.kitware.com/cmake-building-with-all-your-cores/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change this to,