USC-NSL / Computational-Agroecology

6 stars 1 forks source link

add CMakeLists to the project #67

Closed tszxxx closed 5 years ago

ralphchung commented 5 years ago

Could you write some instructions to show other people how to use this? and maybe some other prerequisites?

tszxxx commented 5 years ago

Could you write some instructions to show other people how to use this? and maybe some other prerequisites?

pretty sure, wait for one minute

ralphchung commented 5 years ago

I have tried to run this on my VM. It built successfully, but I encountered an error while executing the environment_main. A segmentation fault occurred.

What I have done is the following:

cd environment
mkdir build && cd build
cmake ../
make
./environment_main

I am pretty sure the original Makefile does not have this issue.

ralphchung commented 5 years ago

Would it be possible to separate the testing targets from the default target? That means that after doing cmake, given the make or make all command, could it produce everything except those testing binaries? Those testing binaries is compiled only when we specify, for instance, make all_test, just like the original Makefile.

tszxxx commented 5 years ago

I have tried to run this on my VM. It built successfully, but I encountered an error while executing the environment_main. A segmentation fault occurred. What I have done is the following: cd environment mkdir build && cd build cmake ../ make ./environment_main

I am pretty sure the original Makefile does not have this issue.

yes, it's all about the wrong initialization of global object __corn_type__ and so on.

ralphchung commented 5 years ago

@tszxxx Unfortunately, it does not work. You can work on it if you still want to spend some time on it. I believe it is absolutely possible to make it work. You could turn to some other important works as well. We could consider this again when we refactor probably in a few weeks.

tszxxx commented 5 years ago

@tszxxx Unfortunately, it does not work. You can work on it if you still want to spend some time on it. I believe it is absolutely possible to make it work. You could turn to some other important works as well. We could consider this again when we refactor probably in a few weeks.

Yes, I'm sure that it works now.