Closed krey closed 8 years ago
Well, it sounds like you have a few different things going on here, one if your project is a CMake project, i.e., contains CMakeLists.txt then there is no need to have build-make. It sounds like you do have a CMake project and an in source CMake generation was performed. The issue with this is that a Makefile and CMakeLists.txt exists in the directory, and for some reason, make-build is being preferred. To fix this, I would remove all of the files that CMake generates (mainly the Makefile) then open the project again in Atom, and all should be good.
Thank you for the speedy response. Yes I have a CMakeLists.txt file.
I've disabled build-make as you suggested and deleted the in source Makefile.
My issue is then that "generate" doesn't run make for me. It creates the ../projectname-build
directory, but it doesn't compile anything.
Okay after it CMake generation you have to change the target to the target that you want to build. By default, if there will be a combo box on the bottom left of the editor. Currently it should say "generate" click on it and change it to all or whatever target you want to compile.
"generate" is the only option. Maybe the issue is with my CMakeLists.txt?
project(Numerical CXX)
cmake_minimum_required(VERSION 2.6)
add_executable(hw1 hw1.cpp
linalg/lu)
add_executable(hw2 hw2.cpp
linalg/cholesky
linalg/lu)
add_executable(hw3 hw3-old.cpp
linalg/solvers
diffeq/poisson
)
add_executable (hw7 hw7.cpp
montecarlo/randomgen
montecarlo/montecarlo
mertonblackscholes/mbscalculator
mertonblackscholes/mertonblackscholes)
set(CMAKE_BINARY_DIR ${CMAKE_SOURCE_DIR}/bin)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR})
include_directories(/usr/include/eigen3 "${PROJECT_SOURCE_DIR}")
link_directories(/usr/local/lib /usr/lib)
target_link_libraries (hw7 gsl cblas)
The file looks okay the only issue that I could see is something about the files 'linalg/lu linalg/cholesky linalg/solvers diffeq/poisson montecarlo/randomgen montecarlo/montecarlo mertonblackscholes/mbscalculator mertonblackscholes/mertonblackscholes' look kind of fishy what are they are they c/cpp source files without the extension or are they static/shared libraries? What is the output of the generate step? By the way sounds like you are working on some very interesting problems.
I added .cpp to the file paths, but it didn't affect the behaviour. (This is my first day using CMake (or Atom for that matter) so I might be making very obvious mistakes.)
Here's the output:
-- The CXX compiler identification is GNU 6.1.1
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/krey/Courses/Numerical Methods/Homework/Numerical-build
By the way sounds like you are working on some very interesting problems.
I have to agree :)
I think it might be that the version of build-cmake is old is just release another version 0.6.0 today try updating to that and see if that helps (go to settings -> updates -> update all). I accidently published the wrong branch in a version around the one you have so I think that might be the issue.
Thanks, unfortunately, I'd already upgraded at the time of my last comment.
(I also haven't changed any configuration options)
I'm using build-cmake with build and build-make.
If I build "generate",
CMakeFiles
is put in../projectname-build/
. This doesn't actually runmake
.If I build "GNU make: default (no target)", it puts a copy of CMakeFiles in
.
. Is this the intended behaviour or am I doing something wrong?Thank you
I'm using Atom 1.8.0, build 0.64.0, build-make 0.10.0, build-cmake 0.5.3 on ArchLinux.